package com.hanhai.zrb.api.biz.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import com.hanhai.zrb.model.common.SysDictionary;


public interface SysDictionaryService {
	
	SysDictionary  selectByPrimaryKey (Long id );

	int deleteByPrimaryKey (Long id );

	int insert( SysDictionary record );

	int insertSelective( SysDictionary record );

	int updateByPrimaryKeySelective( SysDictionary record );

	int updateByPrimaryKey ( SysDictionary record );
	
	PageInfo findPageByKeyWord(SysDictionary sysDictionary,int pageNum,int pageSize);
	
	SysDictionary selectByCode (String itemCode);
	
    List<SysDictionary>getFirstLevelItem();
	
	List<SysDictionary>getItemByParentCode(String parentCode);
	
	Map<String,SysDictionary> getItemsMap(SysDictionary sysDictionary);
	
	List<SysDictionary> listAll();
	
	void refresh();
	
	public SysDictionary getByCodeFromLocalCache(String code);
	
	public List<SysDictionary> listByTopCodeFromLocalCache(String topCode);
}
